﻿namespace Common.Core.Cache
{
    public class CacheKeys
    {
        /// <summary>
        /// 根据会员ID获取会员基础信息缓存Key
        /// </summary>
        public const string BaseUserInfoDTOByIdKey = "BaseUserInfoDTO:Id:{0}";

        /// <summary>
        /// 据会员ID获取会员基础信息缓存时间，2小时=172800秒
        /// </summary>
        public const int BaseUserInfoDTOByIdTime = 7200;

        /// <summary>
        /// 所有地区缓存Key
        /// </summary>
        public const string Cache_AreaAllKey = "Public:Area:All";
        /// <summary>
        /// 所有地区缓存时间，2天=48小时=172800秒
        /// </summary>
        public const int Cache_AreaAllKeyTime = 172800;

        /// <summary>
        /// 服务端加密公钥  当前最新公钥
        /// </summary>
        public const string ServerPublicKey = "Public:ServerPublicKey";
        /// <summary>
        /// 服务端公钥和私钥
        /// </summary>
        public const string ServerPublicPriKeyMd5 = "Public:ServerPublicPriKeyMd5-{0}";

        /// <summary>
        /// 检查同一短信5分钟内只能发一次缓存Key
        /// </summary>
        public const string SMSRepeatTextKey= "SMS:RepeatTextKey-{0}";

        /// <summary>
        /// 检查同一手机号一天内只能发10条缓存Key
        /// </summary>
        public const string SMSRepeatPhoneKey = "SMS:RepeatPhoneKey-{0}";
        /// <summary>
        /// 登录密码加密盐值
        /// </summary>
        public const string PwdMd5SaltKey = "Common";
        /// <summary>
        /// 登录密码错误次数-账号
        /// </summary>
        public const string LoginPwdErrorTimes = "Login:LoginPwdErrorTimes-{0}{1}";
        /// <summary>
        /// 登录密码错误ip-ip
        /// </summary>
        public const string LoginPwdErrorIP = "Login:LoginPwdErrorIP-{0}";
    }
}
